/*/////////////////////////////////////////////////////////////////////////////////
/// An
///    ___   ____ ___ _____ ___  ____
///   / _ \ / ___|_ _|_   _/ _ \|  _ \
///  | | | | |  _ | |  | || | | | |_) |
///  | |_| | |_| || |  | || |_| |  _ <
///   \___/ \____|___| |_| \___/|_| \_\
///                              File
///
/// Copyright (c) 2008-2009 Ismail TARIM <ismail@royalspor.com> and the Ogitor Team
//
//This program is free software; you can redistribute it and/or modify it under
//the terms of the GNU Lesser General Public License as published by the Free Software
//Foundation; either version 2 of the License, or (at your option) any later
//version.
//
//This program is distributed in the hope that it will be useful, but WITHOUT
//ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
//FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
//
//You should have received a copy of the GNU Lesser General Public License along with
//this program; if not, write to the Free Software Foundation, Inc., 59 Temple
//Place - Suite 330, Boston, MA 02111-1307, USA, or go to
//http://www.gnu.org/copyleft/lesser.txt.
////////////////////////////////////////////////////////////////////////////////*/
#ifndef __OgitorsExports_h__
#define __OgitorsExports_h__

#if _WIN32
#   if defined( __MINGW32__ )
#      define OgitorExport
#   else
#      ifdef OGITOR_EXPORT
#         define OgitorExport __declspec (dllexport)
#      else
#         define OgitorExport __declspec (dllimport)
#      endif
#   endif
#else
#   define OgitorExport
#endif

#ifndef _MSC_VER
#define sprintf_s snprintf
#endif

#define INTFROMRGB(r,g,b) ((unsigned long)(((unsigned char)(r)|((unsigned short)((unsigned char)(g))<<8))|(((unsigned short)(unsigned char)(b))<<16)))
#define GetRED(rgb)       ((unsigned char)(rgb & 0xFF))
#define GetGREEN(rgb)     ((unsigned char)(((rgb) >> 8) & 0xFF))
#define GetBLUE(rgb)      ((unsigned char)(((rgb) >> 16) & 0xFF))

#endif // __OgitorsExports_h__
